#!/bin/bash -il
 docker stop regular_refresh
 docker rm regular_refresh
echo ---------------Building Docker Image...------------------
 docker build -t regular_refresh:1.0 .
 # 删除临时创建的镜像
docker rmi $(docker images -f "dangling=true" -q)
echo ---------------Launching Container...------------------
 docker run --ulimit core=0 --log-opt max-size=50m --log-opt max-file=3 --name regular_refresh -d -v /etc/localtime:/etc/localtime --privileged=true --restart=always regular_refresh:1.0

 echo "regular_refresh Finish!"